<template>
  <div class="box">
    <img class='bg' src="../../assets/img/login/perInfo.png" alt="">
    <div class="con">
      <img class='tou' src="../../assets/img/first/conUs.png" alt="">
      <div class="name">用户{{user.nickname}}</div>
      <div class="ul">
        <div class="li flex vc">
          <div class="label">姓名</div>
          <div class="text">{{user.nickname}}</div>
        </div>
        <div class="li flex vc">
          <div class="label">身份</div>
          <div class="text">{{user.alumna ? '校友' : '非校友'}}</div>
        </div>
        <div class="li flex vc">
          <div class="label">单位名称</div>
          <div class="text">{{user.companyName}}</div>
        </div>
        <div class="li flex vc">
          <div class="label">职务</div>
          <div class="text">{{user.position}}</div>
        </div>
        <div class="li flex vc hb">
          <div class="label">密码修改</div>
          <img class='back' src="../../assets/img/invoice/back.png" alt="">
        </div>
        <button class='submit'>退出登录</button>
      </div>
    </div>
  </div>
</template>

<script>
import { userInfo } from '@/api/login'
export default {
  data () {
    return {
      user: {}
    }
  },
  created () {
    userInfo().then(response => {
      this.user = response.data
    })
  }
}
</script>

<style scoped="scoped">
  .box {
    font-size: 16px;
    position: relative;
  }

  .bg {
    width: 100%;
  }

  .con {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
    padding: 22px 15px 0;
  }

  .tou {
    display: block;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 4px solid #fff;
    margin: 0 auto;
  }

  .name {
    color: #fff;
    font-size: 16px;
    text-align: center;
    padding: 15px;
  }

  .ul {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    padding: 10px 20px 0;
  }

  .li {
    padding: 20px 5px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .li .label {
    width: 75px;
  }

  .back {
    width: 8px;
    height: 16px;
  }

  .submit {
    display: block;
    width: 100%;
    height: 50px;
    background: #8C2E27;
    color: #fff;
    border-radius: 100px;
    margin: 50px auto 0;
    text-align: center;
    line-height: 50px;
    font-size: 18px;
    box-shadow: 0px 8px 15px 0px rgba(0, 0, 0, 0.15);
  }
</style>
